# !/usr/bin/env python
# encoding: utf-8


"""
  @author: gaogao
  @file: save_data_2_ini.py
  @time: 2022/4/7 13:19
  @desc:
"""
from configparser import ConfigParser, SafeConfigParser
from ATS.util import constant


def save_data_2_ini(x_data, y_data):
    config = SafeConfigParser()
    config.read(constant.REFRENCE_DATA_PATH)
    config.set(constant.REFRENCE_DATA_SECTION, "x_refrence", x_data)
    config.set(constant.REFRENCE_DATA_SECTION, "y_refrence", y_data)
    with open(constant.REFRENCE_DATA_PATH, 'w') as f:
        config.write(f)
